import request from '@/utils/request'

export function queryData(data) {
  return request({
    url: '/novel/Subscribe/query',
    method: 'post',
    data
  })
}

export function save(data) {
  return request({
    url: '/novel/Subscribe/save',
    method: 'post',
    data
  })
}

export function reset(id) {
  return request({
    url: `/novel/Subscribe/reset/${id}`,
    method: 'get'
  })
}

export function deletes(id) {
  return request({
    url: `/novel/Subscribe/delete/${id}`,
    method: 'get'
  })
}

export function restore(id) {
  return request({
    url: `/novel/Subscribe/restore/${id}`,
    method: 'get'
  })
}

export function getSpiders() {
  return request({
    url: '/spider/site/getall',
    method: 'get'
  })
}

export function getDetail(id) {
  return request({
    url: `/spider/site/detail/${id}`,
    method: 'get'
  })
}

export function add(data) {
  return request({
    url: '/spider/site/add',
    method: 'post',
    data
  })
}





export function start(host) {
  return request({
    url: `/spider/site/start`,
    method: 'get',
    params: host
  })
}

export function stop(host) {
  return request({
    url: `/spider/site/stop`,
    method: 'get',
    params: host
  })
}

export function pause(host) {
  return request({
    url: `/spider/site/pause`,
    method: 'get',
    params: host
  })
}

// export function reset(host) {
//   return request({
//     url: `/spider/site/reset`,
//     method: 'get',
//     params: host
//   })
// }